package com.yuntai.pms.model.enums.district;

import java.util.LinkedHashMap;
import java.util.Map;

public enum DistType {

    MAIN(0, "主院区"),
    REGION(1, "分院区");

    private int code;
    private String name;
    private final  static Map<Integer,String> distTypeMap = new LinkedHashMap<Integer,String>();

    public static Map<Integer, String> getDistTypeMap() {
        return distTypeMap;
    }

    static   {
        distTypeMap.put(DistType.MAIN.getCode(), DistType.MAIN.getName());
        distTypeMap.put(DistType.REGION.getCode(), DistType.REGION.getName());
    }
    private DistType(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

}
